import axios from 'common/js/axios'
import Config from '@/config'

// 账户状态
export function ApiInfo(json) {
    const url = '/saas/api-info'

    return axios.get(url, json)
}

// 接口实时状态
export function ApiStatus(json) {
    const url = '/saas/api-status'

    return axios.get(url, json)
}

// 资质信息
export function Protocol(json) {
    const url = '/saas/protocol'

    return axios.post(url, json)
}

// 资质信息
export function ProtocolUpdate(json) {
    const url = '/saas/protocolUpdate'

    return axios.post(url, json)
}

// 应用配置
export function AppSetting(json) {
    const url = '/saas/appSetting'

    return axios.post(url, json)
}

// 应用配置更新
export function AppSettingUpdate(json) {
    const url = '/saas/appSettingUpdate'

    return axios.post(url, json)
}


// 获取基础配置
export function BaseSetting(json) {
    const url = '/saas/baseSetting'

    return axios.post(url, {})
}

// 更新基础配置
export function BaseSettingUpdate(json) {
    const url = '/saas/baseSettingUpdate'

    return axios.post(url, json)
}

// 概览
export function Info(json) {
    const url = '/saas/info'

    return axios.get(url, {})
}

// 版本信息
export function GetVersion(json) {
    const url = '/version/info'

    return axios.get(url, {})
}

// 预览二维码
export function GetCode(json) {
    const url = '/version/getCode'

    return axios.get(url, {})
}

// 提交审核
export function Commit(json) {
    const url = '/version/commit/' + json

    return axios.get(url, {})
}

// 提交审核
export function Release(json) {
    const url = '/version/release'

    return axios.get(url, {})
}

// 撤回审核
export function UnCommit(json) {
    const url = '/version/unCommit'

    return axios.get(url, {})
}

// 概览信息
export function OverviewEntrance(json) {
    const url = '/overview/overviewEntrance'

    return axios.post(url, json)
}

// 微信关注配置
export function SubscribeConfig(json) {
    const url = '/saas/subscribeConfig'

    return axios.post(url, json)
}

// 微信关注配置更新
export function SubscribeConfigUpdate(json) {
    const url = '/saas/subscribeConfigUpdate'

    return axios.post(url, json)
}

// 首页
export function IndexComponet(json) {
    const url = '/Index/indexComponet'

    return axios.post(url, json)
}

// 域名管理
export function DomainManage(json) {
    const url = '/wap/domainManage'

    return axios.post(url, json)
}

// 域名创建
export function DomainCreate(json) {
    const url = '/wap/domainCreate'

    return axios.post(url, json)
}
// 域名删除
export function DomainRecycle(json) {
    const url = '/wap/domainRecycle'

    return axios.post(url, json)
}
// 域名更新
export function DomainUpdate(json) {
    const url = '/wap/domainUpdate'

    return axios.post(url, json)
}
// 域名状态更新
export function DomainState(json) {
    const url = '/wap/DomainState'

    return axios.post(url, json)
}
// 分享配置更新
export function ShareSettingUpdate(json) {
    const url = '/saas/ShareSettingUpdate'

    return axios.post(url, json)
}
// 分享配置列表
export function ShareSetting(json) {
    const url = '/saas/shareSetting'

    return axios.post(url, json)
}

// 首页更新
export function IndexComponetUpdate(json) {
    const url = '/Index/indexComponetUpdate'

    return axios.post(url, json)
}

// 主题色
export function Theme(json) {
    const url = '/Index/theme'

    return axios.post(url, json)
}

// 主题色更新
export function ThemeUpdate(json) {
    const url = '/Index/themeUpdate'

    return axios.post(url, json)
}


// 专题列表
export function TopiceList(json) {
    const url = '/topice/topiceList'

    return axios.post(url, json)
}

// 专题创建
export function TopiceCreate(json) {
    const url = '/topice/topiceCreate'

    return axios.post(url, json)
}

// 专题编辑
export function TopiceEdit(json) {
    const url = '/topice/topiceEdit'

    return axios.post(url, json)
}

// 专题删除
export function TopiceDelete(json) {
    const url = '/topice/topiceDelete'

    return axios.post(url, json)
}

// 职位选择器
export function JobSelector(json) {
    const url = '/topice/jobSelector'

    return axios.post(url, json)
}


// 商家选择器
export function CompanySelector(json) {
    const url = '/topice/companySelector'

    return axios.post(url, json)
}


// 获取区域代理
export function SaasAreas(json) {
    const url = '/saas/saasAreas'

    return axios.post(url, json)
}

// 获取红包配置数据
export function RedBagSetting(json) {
    const url = 'saas/redBagSetting'

    return axios.post(url, json)
}

export function RedBagSettingUpdate(json) {
    const url = '/saas/redBagSettingUpdate'

    return axios.post(url, json)
}